<template>
  <div class="areaList">
    <div class="head">
      <h2 class="title">{{ $t("home.region") }}</h2>
      <p @click="goto('nationalArea')">
        {{ $t("public.more") }}<i class="el-icon-arrow-right"></i>
      </p>
    </div>
    <world-box :worldData="list"></world-box>

    <!-- <new-album :listData="newAlbums"></new-album> -->
  </div>
</template>

<script>
import worldBox from "@/components/common/worldBox/Index";
// import albumList from "@/components/common/albumList/Index";
export default {
  props: {
    list: {
      type: Array,
    },
  },
  components: {
    worldBox,
    // albumList,
  },
  data() {
    return {};
  },
  computed: {
    isMobile() {
      return this.$store.getters.isMobile;
    },
  },
  created() {},
  mounted() {},
  methods: {
    goto(name) {
      let navData = [];
      if (this.isMobile) {
        navData = [
          {
            menuId: "3-1",
            menuCname: "精品专辑",
            menuName: "Album",
            url: "/national/album",
          },
          {
            menuId: "3-2",
            menuCname: "歌单",
            menuName: "SongList",
            url: "/national/m-song-list",
          },
          {
            menuId: "3-3",
            menuCname: "艺术家",
            menuName: "Artist",
            url: "/national/artist",
          },
          {
            menuId: "3-4",
            menuCname: "文化",
            menuName: "Culture",
            url: "/national/culture",
          },
          {
            menuId: "3-5",
            menuCname: "地区",
            menuName: "Area",
            url: "/national/area",
          },
          {
            menuId: "3-6",
            menuCname: "厂牌",
            menuName: "Brand",
            url: "/national/brand",
          },
          {
            menuId: "3-7",
            menuCname: "检索",
            menuName: "search",
            url: "/national/search",
          },
        ];
      } else {
        navData = [
          {
            menuId: "3-1",
            menuCname: "精品专辑",
            menuName: "Album",
            url: "/national/album",
          },
          {
            menuId: "3-2",
            menuCname: "歌单",
            menuName: "SongList",
            url: "/national/song-list",
          },
          {
            menuId: "3-3",
            menuCname: "艺术家",
            menuName: "Artist",
            url: "/national/artist",
          },
          {
            menuId: "3-4",
            menuCname: "文化",
            menuName: "Culture",
            url: "/national/culture",
          },
          {
            menuId: "3-5",
            menuCname: "地区",
            menuName: "Area",
            url: "/national/area",
          },
          {
            menuId: "3-6",
            menuCname: "厂牌",
            menuName: "Brand",
            url: "/national/brand",
          },
          {
            menuId: "3-7",
            menuCname: "检索",
            menuName: "search",
            url: "/national/search",
          },
        ];
      }
      window.sessionStorage.setItem("navData", JSON.stringify(navData));
      this.$store.commit("SET_NAVDATA", navData);
      this.$router.push({ name: name });
    },
  },
};
</script>

<style lang="scss" scoped>
.areaList {
  .head {
    > p {
      cursor: pointer;
      &:hover {
        text-decoration: underline;
      }
    }
  }
}
</style>
